package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BrandCategoryManagementMapper;
import com.ruoyi.system.domain.BrandCategoryManagement;
import com.ruoyi.system.service.IBrandCategoryManagementService;

/**
 * 品牌分类管理 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-28
 */
@Service
public class BrandCategoryManagementServiceImpl implements IBrandCategoryManagementService
{
    @Autowired
    private BrandCategoryManagementMapper brandCategoryManagementMapper;

    /**
     * 通过id查询品牌分类管理
     *
     * @param id 品牌分类管理主键
     * @return 品牌分类管理
     */
    @Override
    public BrandCategoryManagement selectBrandCategoryManagementById(Long id)
    {
        return brandCategoryManagementMapper.selectBrandCategoryManagementById(id);
    }

    /**
     * 通过分类查询品牌分类管理列表
     *
     * @param categoryName 分类名称
     * @return 品牌分类管理
     */
    @Override
    public List<BrandCategoryManagement> selectBrandCategoryManagementListByName(String categoryName)
    {
        return brandCategoryManagementMapper.selectBrandCategoryManagementListByName(categoryName);
    }

    /**
     * 新增品牌分类管理
     *
     * @param brandCategoryManagement 品牌分类管理
     * @return 结果
     */
    @Override
    public int insertBrandCategoryManagement(BrandCategoryManagement brandCategoryManagement)
    {
        return brandCategoryManagementMapper.insertBrandCategoryManagement(brandCategoryManagement);
    }

    /**
     * 修改品牌分类管理
     *
     * @param brandCategoryManagement 品牌分类管理
     * @return 结果
     */
    @Override
    public int updateBrandCategoryManagement(BrandCategoryManagement brandCategoryManagement)
    {
        return brandCategoryManagementMapper.updateBrandCategoryManagement(brandCategoryManagement);
    }

    /**
     * 通过id批量删除品牌分类管理信息
     *
     * @param ids 需要删除的品牌分类管理主键
     * @return 结果
     */
    @Override
    public int deleteBrandCategoryManagementByIds(Long[] ids)
    {
        return brandCategoryManagementMapper.deleteBrandCategoryManagementByIds(ids);
    }

    /**
     * 通过id删除品牌分类管理信息
     *
     * @param id 品牌分类管理主键
     * @return 结果
     */
    @Override
    public int deleteBrandCategoryManagementById(Long id)
    {
        return brandCategoryManagementMapper.deleteBrandCategoryManagementById(id);
    }
}
